package demo;

import java.time.ZonedDateTime;
import java.util.Date;

public class ZonedDateTimeToDate {
    public static void main(String[] args) {
        // 获取当前的ZonedDateTime
        ZonedDateTime zonedDateTime = ZonedDateTime.now();
        
        // 转换为Instant然后转为Date
        Date date = Date.from(zonedDateTime.toInstant());
        
        System.out.println("ZonedDateTime: " + zonedDateTime);
        System.out.println("Date: " + date);
    }
}